package vectordb;

/**
 * 表示向量搜索结果的类
 */
public class VectorSearchResult {
    private VectorDocument document;
    private double score;

    /**
     * 创建一个新的向量搜索结果
     * 
     * @param document 向量文档
     * @param score 相似度分数
     */
    public VectorSearchResult(VectorDocument document, double score) {
        this.document = document;
        this.score = score;
    }

    public VectorDocument getDocument() {
        return document;
    }

    public void setDocument(VectorDocument document) {
        this.document = document;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "VectorSearchResult{" +
                "document=" + document.getId() +
                ", relativePath='" + document.getRelativePath() + '\'' +
                ", score=" + score +
                '}';
    }
}